﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLQTPM_Nhom6.UTIL;
using System.Data.OleDb;
using System.Data;

namespace QLQTPM_Nhom6.DAO
{
    public class TinhThanhDAO
    {
        
        
        public static DataTable ShowTT()
        {
            DataProvider dp = new DataProvider();          
            try
            {
                dp.Open();
                dp.Data_Table = dp.ExecuteQuery("select tt.MaTinhThanh, tt.TenTinhThanh, tk.TuKhoaTinhThanh from TinhThanh tt, TuKhoaTinhThanh tk where tt.MaTinhThanh=tk.MaTinhThanh");
                dp.DisConn();
            }
            catch (Exception ex)
            {
                throw new Exception("Error: " + ex.Message);
            }
            return dp.Data_Table;
        }
    }
}
